import React from 'react'; //react核心库
import ReactDOM from 'react-dom'; //reactdom操作库
import './index.css'; //全局样式
import 'bootstrap/dist/css/bootstrap.css'
import App from './components/app/App'; //引入根组件
import store from './redux/store';
import { Provider } from 'react-redux'

ReactDOM.render(
  <Provider store={store}>
    <App />
  </Provider>,
  document.getElementById('root')
);
// 注册（订阅）监听状态值，当状态值发生改变，自动重新渲染
/* store.subscribe(() => {
  ReactDOM.render(<App store={store} />,
    document.getElementById('root')
  );
}) */

// If you want to start measuring performance in your app, pass a function
// to log results (for example: reportWebVitals(console.log))
// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals